package functii;

import operatori.*;

/**
 * @author Sorica Alexandra
 */

public class SinusHiperbolic extends Functie {
	public static double calcul(double aux1){
		return Math.sinh(aux1);
		}
	public double calcul(){
		if (ns == null)
			System.exit(1);
		return calcul(ns.calcul());
		}
	public String derivare()
	{
		if (ns == null)
			System.exit(1);
		return Produs.concatTermens(ns.derivare(),Cos.concatTermeni(ns.toString()));
		}
	public double calculDerivata(){
		if (ns == null)
			System.exit(1);
		return Produs.Calcul(ns.calculDerivata(),Cos.Calcul(ns.calcul()));
		}
	public String toString(){
		if (ns == null)
			System.exit(1);
		return concatTermeni(ns.toString());
		}
	
	public static String concatTermeni(String aux1){
		String aux;
		int nrP;
		nrP = aux1.charAt(0) == '(' ? 0 : 2;
		aux = "sinh";
		if (nrP != 0) aux += "(";
		aux += aux1;
		if (nrP != 0) aux += ")";
		return aux;
		}
	public static double Calcul(double calcul) {
		return Math.sin(calcul);
		}
	public double calculeazaValoare() {
		return this.calcul();
		}
	}

